<{if $addrlist}>
<ul class="receiver-sel">
  <{foreach from=$addrlist key=iloop item=addr}>
  <li>
  <label><input type="radio" name="delivery[addr_id]" value="<{$addr.addr_id}>" class="receiver_radio_addr_id" <{if $addr.def_addr}> checked<{/if}>><{$addr.addr_region|region}> <{$addr.addr_label}><{if $addr.def_addr}><input type="hidden" name="def_addr" value="<{$addr.addr_id}>" /><{/if}>
  </label>
  </li>
  <{/foreach}>
  <li>
  <label><input type="radio" name="delivery[addr_id]" value="0"<{if $other_addr_checked == 'true'}>checked="checked"<{/if}> class="receiver_radio_addr_id other_addr"><{t}>其他收货地址<{/t}><{if $other_addr_checked == 'true'}><input type="hidden" name="def_addr" value="0" /><{/if}></label>
  </li>
</ul>
<{/if}>

<script>
(function(){
	selectArea = function(sels) {
        var selected = [];
        sels.each(function(s){
            if(s.getStyle('display') != 'none') {
               var text = s[s.selectedIndex].text.trim().clean();
               if(['<{t}>北京<{/t}>','<{t}>天津<{/t}>','<{t}>上海<{/t}>','<{t}>重庆<{/t}>'].indexOf(text)>-1)return;
               selected.push(text);
            }
        });
        var selectedV = selected.join('');
        $('selected-area').set('text',selectedV).removeClass('font-gray').addClass('font-black');
        $('selected-area-hidden').value =  selectedV;
        var _addr_node = $('addr');
        var _addr_value = _addr_node.value;
        var _replaced_value = _addr_node.value.replace(selectedV,'');

        var _input_radios = $ES('input[name^=delivery[addr_id]]');

        if (_input_radios.length > 0){
            if (_replaced_value == '' && $('receiver').retrieve('b2c-cart-checkout-ship-addr') == 'true')
                _replaced_value = '.';
        }
        $('addr').set('value',_replaced_value);
    };
})();
</script>